
/*
Table 8: Mine-level coal production after exposure to bank MTR policies

The dependent variable is the natural logarithm of one plus the annual tonnage of coal produced by each surface mine, in millions. The unit of observation is mine-by-calendar year from 2000 to 2020 for 489 unique surface mines. Anti-MTR Policy Exposure equals one if at least one recent lender (on a loan in started the prior five calendar years) implemented an MTR lending policy prior to the production year. Avg. Anti-MTR Policy Exposure is the proportion of recent lenders that implement lending policies prior to production year t. MTR Indicator equals one for mines in West Virginia or Kentucky with active mountaintop removal permits or onsite valley fills in year t based on state-level mine permit records, and zero otherwise. Ln Assets is the natural logarithm of prior-year total assets (Compustat at), Sales growth is the growth rate in sales from year t-2 to t-1, and Leverage is the prior-year ratio of debt (dlc+dltt) to total assets for the mine's corporate controller. Regressions include year, company, and mine location (state) fixed effects. Standard errors are clustered at the company level.
*/

cd "C:\Users\pgi1\Dropbox\Coal 2021 _ Joe Peter\Bank Regressions\code"

use mine_yr_production_dataset, clear

*(1) All
reghdfe lncoal i.exposure##i.mtrvf, absorb(prodyr parent_id stateid) vce(cluster parent_id)
outreg2 using t8.doc, replace dec(3) addstat(Adj. R2, e(r2_a))

*(2) w/ financial data
reghdfe lncoal i.exposure##i.mtrvf if funda==1, absorb(prodyr parent_id stateid) vce(cluster parent_id)
outreg2 using t8.doc, append dec(3) addstat(Adj. R2, e(r2_a))

*(3) w/ financial data, controls
reghdfe lncoal i.exposure##i.mtrvf lnat_1 gsale_1 debta_1 if funda==1, absorb(prodyr parent_id stateid) vce(cluster parent_id)
outreg2 using t8.doc, append dec(3) addstat(Adj. R2, e(r2_a))

*(4) All--average exposure
reghdfe lncoal c.avgexposure##i.mtrvf, absorb(prodyr parent_id stateid) vce(cluster parent_id)
outreg2 using t8.doc, append dec(3) addstat(Adj. R2, e(r2_a))

*(5) w/ financial data--average exposure
reghdfe lncoal c.avgexposure##i.mtrvf if funda==1, absorb(prodyr parent_id stateid) vce(cluster parent_id)
outreg2 using t8.doc, append dec(3) addstat(Adj. R2, e(r2_a))

*(6) w/ financial data, controls--average exposure
reghdfe lncoal c.avgexposure##i.mtrvf lnat_1 gsale_1 debta_1 if funda==1, absorb(prodyr parent_id stateid) vce(cluster parent_id)
outreg2 using t8.doc, append dec(3) addstat(Adj. R2, e(r2_a))
